package com.Iron.OtherBean;


import com.Iron.Dao.UserDao;
import com.alibaba.druid.pool.DruidDataSource;
import javafx.scene.chart.PieChart;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.stereotype.Component;

import javax.sql.DataSource;

/*@Component*/
public class OtherBean {


    @Bean("dataSource")
    public DataSource getDataSource(@Value("${jdbc.driver}") String p,
                                    @Autowired UserDao userDao){
        DruidDataSource druidDataSource = new DruidDataSource();
        System.out.println(userDao);
        System.out.println(p);
        return druidDataSource;
    }

    public void ddd(String par){

    }
}
